﻿using System.Collections.Generic;

namespace AreaHelper
{
    /// <summary>
    /// 区域基类
    /// </summary>
    public class BaseArea
    {
        /// <summary>
        /// 区域名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 区域编码
        /// </summary>
        //public string Code { get; set; }
        /// <summary>
        /// 区域名称全拼
        /// </summary>
        public string FullPY
        {
            get
            {
                return PinYin.ConvertFull(Name);
            }
        }
        /// <summary>
        /// 区域名称简拼
        /// </summary>
        public string AbbPY
        {
            get
            {
                return PinYin.ConvertAbb(Name);
            }
        }
    }

    /// <summary>
    /// 省份
    /// </summary>
    public class Province : BaseArea
    {
        /// <summary>
        /// 城市列表
        /// </summary>
        public List<City> Cities { get; set; }

        public Province()
        {
            Cities = new List<City>();
        }
    }
    /// <summary>
    /// 城市
    /// </summary>
    public class City : BaseArea
    {
        /// <summary>
        /// 区/县列表
        /// </summary>
        public List<County> Counties { get; set; }

        public City()
        {
            Counties = new List<County>();
        }
    }

    /// <summary>
    /// 区/县
    /// </summary>
    public class County : BaseArea
    {
    }
}
